package com.jintian.smart.oa.mapper;

import com.jintian.smart.kernel.orm.mapper.IBaseExtMapper;
import com.jintian.smart.base.api.oa.entity.EnterpriseEntity;
import com.jintian.smart.base.api.oa.form.EnterpriseQueryForm;
import com.jintian.smart.base.api.oa.view.EnterpriseExcelVO;
import com.jintian.smart.base.api.oa.view.EnterpriseListVO;
import com.jintian.smart.base.api.oa.view.EnterpriseVO;
import org.beetl.sql.core.page.PageResult;
import org.beetl.sql.mapper.annotation.Mapper;
import org.beetl.sql.mapper.annotation.Param;
import org.beetl.sql.mapper.annotation.SqlResource;

import java.util.List;

/**
 * 企业
 */
@Mapper
@SqlResource("oa.Enterprise")
public interface EnterpriseMapper extends IBaseExtMapper<EnterpriseEntity> {
    /**
     * 根据企业名称查询
     */
    EnterpriseEntity queryByEnterpriseName(@Param("enterpriseName") String enterpriseName, @Param("excludeEnterpriseId") Long excludeEnterpriseId, @Param("deletedFlag") Integer deletedFlag);

    /**
     * 删除企业
     */
    void deleteEnterprise(@Param("enterpriseId") Long enterpriseId, @Param("deletedFlag") Integer deletedFlag);

    /**
     * 企业分页查询
     */
    PageResult<EnterpriseVO> queryPage(@Param("queryForm") EnterpriseQueryForm queryForm);

    /**
     * 查询导出的数据
     */
    List<EnterpriseExcelVO> selectExcelExportData(@Param("queryForm") EnterpriseQueryForm queryForm);

    /**
     * 查询企业详情
     */
    EnterpriseVO getDetail(@Param("enterpriseId") Long enterpriseId, @Param("deletedFlag") Integer deletedFlag);

    /**
     * 查询列表
     */
    List<EnterpriseListVO> queryList(@Param("type") Integer type, @Param("disabledFlag") Integer disabledFlag, @Param("deletedFlag") Integer deletedFlag);
}
